package com.tracker;
import com.commonProject.common.classes.CompanyDTO
import com.commonProject.common.intefaces.ICompany

class CompanyService {
	static transactional = true
	ICompany companyServiceProxy
	
	def getelement(params){
			Long company_id = Long.valueOf(params.get("id"))
			println("companyId = "+company_id)
			CompanyDTO el = null
			try {
				el=companyServiceProxy.getelement(company_id)
			} catch(Exception ex) {
				//println "-->EXCEPTION: ${ex}"
				println "No server connection"
				return ['success':'false']
			}			
			return  [
			 'success' : 'true',
			 id : el.id,
			 title : el.title,
			 email : el.email,
			 dateCreated : el.dateCreated
		 ]
		} 
};